package com.mall.dao;

import com.mall.entity.ZhaoTongMallShoppingCartItem;
import com.mall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ZhaoTongMallShoppingCartItemMapper {
    int deleteByPrimaryKey(Long cartItemId);

    int insert(ZhaoTongMallShoppingCartItem record);

    int insertSelective(ZhaoTongMallShoppingCartItem record);

    ZhaoTongMallShoppingCartItem selectByPrimaryKey(Long cartItemId);

    ZhaoTongMallShoppingCartItem selectByUserIdAndGoodsId(@Param("zhaoTongMallUserId") Long zhaoTongMallUserId, @Param("goodsId") Long goodsId);

    List<ZhaoTongMallShoppingCartItem> selectByUserId(@Param("zhaoTongMallUserId") Long zhaoTongMallUserId, @Param("number") int number);

    List<ZhaoTongMallShoppingCartItem> selectByUserIdAndCartItemIds(@Param("zhaoTongMallUserId") Long zhaoTongMallUserId, @Param("cartItemIds") List<Long> cartItemIds);

    int selectCountByUserId(Long zhaoTongMallUserId);

    int updateByPrimaryKeySelective(ZhaoTongMallShoppingCartItem record);

    int updateByPrimaryKey(ZhaoTongMallShoppingCartItem record);

    int deleteBatch(List<Long> ids);

    List<ZhaoTongMallShoppingCartItem> findMyZhaoTongMallCartItems(PageQueryUtil pageUtil);

    int getTotalMyZhaoTongMallCartItems(PageQueryUtil pageUtil);
}
